import request from '../request'

export function getVYqBrdjxxPagesInfo(params) {
    return request({
        url: 'VYqBrdjxxController/getVYqBrdjxxPagesInfo',
        method: 'POST',
        data: params
    })
}

export function getVYqBrdjxxRJSSPagesInfo(params) {
    return request({
        url: 'VYqBrdjxxController/getVYqBrdjxxRJSSPagesInfo',
        method: 'POST',
        data: params
    })
}


export function getExportVYqBrdjxxInfo(params) {
    return request({
        url: 'VYqBrdjxxController/getVYqBrdjxxDownLoad',
        method: 'POST',
        data: params,
        responseType: 'blob'
    })
}

export function getExportVYqBrdjxxRJSSInfo(params) {
    return request({
        url: 'VYqBrdjxxController/getVYqBrdjxxRJSSDownLoad',
        method: 'POST',
        data: params,
        responseType: 'blob'
    })
}

export function getDept(params) {
    return request({
        url: 'VYqBrdjxxController/getDept',
        method: 'GET',
        params
    })
}

export function getAccess(params) {
    return request({
        url: `authority-prehospital/getAccess?yard=${params.yard}`,
        method: 'GET',
        data: params
    })
}
// /

export function getVYqBrdjxx(params) {
    return request({
        url: 'VYqBrdjxxController/getVYqBrdjxx',
        method: 'POST',
        data: params
    })
}

export function getRJSSVYqBrdjxx(params) {
    return request({
        url: 'VYqBrdjxxController/getRJSSVYqBrdjxx',
        method: 'POST',
        data: params
    })
}

export function getBedUggIeCW(params) {
    return request({
        url: 'this-ii-inmaininfo/getBedUggIeCW',
        method: 'POST',
        data: params
    })
}

export function getBedUggIeCWDownLoadExcel(params) {
    return request({
        url: 'this-ii-inmaininfo/getBedUggIeCWDownLoadExcel',
        method: 'POST',
        data: params,
        responseType: 'blob'
    })
}

export function getBedApplicationDownLoadExcel(params) {
    return request({
        url: '/application-bed/getBedApplicationDownLoadExcel',
        method: 'POST',
        data: params,
        responseType: 'blob'
    })
}
// export function getReportDetail(params) {
//   return request({
//     url: 'VYqBrdjxxController/getReportDetail',
//     method: 'GET',
//     params
//   })
// }

// 院前界面报表
export function getReportList(params) {
    return request({
        url: '/VYqBrdjxxController/getReportList',
        method: 'POST',
        data: params
    })
}

// 院前一体化程序报表
export function getReportListIntegrated(params) {
    return request({
        url: 'VYqBrdjxxController/getReportListIntegrated',
        method: 'GET',
        params
    })
}


// 院前准备下载
export function getReportListDownLoadExcel(params) {
    return request({
        url: `VYqBrdjxxController/getReportListDownLoadExcel`,
        method: 'post',
        data: params,
        responseType: 'blob'
    })
}

// 院前准备下载(外用)
export function getReportListIntegratedDownLoadExcel(params) {
    return request({
        url: `VYqBrdjxxController/getReportListIntegratedDownLoadExcel`,
        method: 'get',
        params,
        responseType: 'blob'
    })
}



// 日间病床中心报表
export function getRJSSReportList(params) {
    return request({
        url: '/VYqBrdjxxController/getReportList',
        method: 'POST',
        data: params
    })
}

// 日间病床中心一体化程序报表
export function getRJSSReportListIntegrated(params) {
    return request({
        url: 'VYqBrdjxxController/getRJSSReportListIntegrated',
        method: 'GET',
        params
    })
}



// 日间病床中心下载
export function getRJSSReportListDownLoadExcel(params) {
    return request({
        url: `VYqBrdjxxController/getRJSSReportListDownLoadExcel`,
        method: 'GET',
        params,
         responseType: 'blob'
    })
}


// 院前准备权限 添加
export function save(params) {
    return request({
        url: `authority-prehospital/save`,
        method: 'post',
        data: params
    })
}
// 院前准备权限 删除
export function deleteSet(params) {
    return request({
        url: `authority-prehospital/delete/${params.id}`,
        method: 'delete',
        data: params
    })
}
// 院前准备权限 获取列表
export function getAccessPageInfoVersion(params) {
    return request({
        url: `authority-prehospital/getAccessPageInfoVersion?pageNum=${params.pageNum}&pageSize=${params.pageSize}&userCode=${params.userCode}`,
        method: 'get',
        data: params
    })
}

// 检验特殊处理接 添加
export function specialSave(params) {
    return request({
        url: `examine-special/save`,
        method: 'post',
        data: params
    })
}
// 检验特殊处理接  查看
export function specialGetById(params) {
    return request({
        url: `examine-special/getById/${params.clinicCode}`,
        method: 'get',
        data: params
    })
}

// 院前准备 取消(1)
export function cancelIiprepayIn(params) {
    console.log(params)
    return request({
        url: `VYqBrdjxxController/cancelIiprepayIn?preId=${params.preId}&state=${params.state}`,
        method: 'get',
        data: params
    })
}

// 院前准备 取消(2)
// export function cancelIiprepayIn(params) {
//   return request({
//     url: `VYqBrdjxxController/cancelIiprepayIn`,
//     method: 'get',
//     params
//   })
// }

// 院前准备 恢复预约(一)
// export function cancelAppointment(params) {
//   return request({
//     // url: `VYqBrdjxxController/cancelIiprepayIn?preId=${params.preid}`,
//     url: 'VYqBrdjxxController/cancelAppointment',
//     method: 'get',
//     params
//   })
// }

// 院前准备 恢复预约(二)
// export function cancelAppointment(params) {
//   return request({
//     // url: `VYqBrdjxxController/cancelIiprepayIn?preId=${params.preid}`,
//     url: `VYqBrdjxxController/cancelAppointment?preId=${params.preid}`,
//     method: 'get',
//     data: params
//   })
// }

// 院前准备 登记
export function saveYQRegister(params) {
    return request({
        url: `register-record/saveYQRegister?preId=${params.preid}&state=${params.state}`,
        method: 'get',
        data: params
    })
}
// 院前准备 取消登记
export function CancelYQRegister(params) {
    return request({
        url: `register-record/CancelYQRegister?preId=${params.preid}`,
        method: 'get',
        data: params
    })
}

// 获取登记人数
export function gePpeopleStatistics(params) {
    return request({
        url: '/VYqBrdjxxController/gePpeopleStatistics',
        method: 'POST',
        data: params
    })
}

// 添加备注
export function saveOrUpdate(params) {
    return request({
        url: '/yq-beizhu/saveOrUpdate',
        method: 'post',
        data: params
    })
}

// 获取备注历史记录
export function SelectBeiZhu(params) {
    return request({
        url: '/yq-beizhu/SelectBeiZhu',
        method: 'POST',
        data: params
    })
}

// 院前患者统计列表
export function listPatientInfoToDoctor(params) {
    return request({
        url: '/VYqBrdjxxController/listPatientInfoToDoctor',
        method: 'POST',
        data: params
    })
}

// 院前患者统计列表--导出
export function getListPatientInfoToDoctorExcel(params) {
    return request({
        url: '/VYqBrdjxxController/getListPatientInfoToDoctorExcel',
        method: 'POST',
        data: params,
        responseType: 'blob'
    })
}
